import { TableBase, TextTable } from '@/components/public-template';

class HomeService {
  getTables() {
    const tables: TableBase<any>[] = [
      new TextTable({
        key: 'num',
        value: '序号',
        type: 'index'
      }),
      new TextTable({
        key: 'name1',
        value: '文件名称'
      }),
      new TextTable({
        key: 'name2',
        value: '文件编码'
      }),
      new TextTable({
        key: 'name3',
        value: '版本号'
      }),
      new TextTable({
        key: 'name4',
        value: '保密等级'
      }),
      new TextTable({
        key: 'name5',
        value: '生效日期'
      }),
      new TextTable({
        key: 'name5',
        value: '文件责任人'
      }),
      new TextTable({
        key: 'actions',
        value: '操作',
        handle: [
          {
            type: 'url',
            url: 'url',
            text: '预览',
            class: 'text-primary',
            params: [{ id: 'id' }],
            state: {}
          }
        ]
      })
    ];
    return tables;
  }
}

export default new HomeService();
